#include <stdio.h>
#include <stdlib.h>

typedef struct LNode
{
    char dada;
    struct LNode *next;
} LNode, *MyStack;

//带头结点
void init(MyStack &S)
{
    S = (LNode *)malloc(sizeof(LNode));
    S->next = NULL;
}

bool Push(MyStack &S, char x)
{
    LNode *p = (LNode *)malloc(sizeof(LNode));
    p->dada = x;
    p->next = S->next;
    S->next = p;
    return true;
}

bool Pop(MyStack &S, char &x)
{
    x = S->next->dada;
    S->next = S->next->next;
    free(S->next);
    return true;
}

void print(MyStack S)
{
    while (S->next != NULL)
    {
        printf("%c\n", S->next->dada);
        S = S->next;
    }
}

bool Solution(MyStack S)
{
    
}

int main()
{
    printf("\n\n========================================================================\n\n");
    MyStack S;
    init(S);
    Push(S, 'a');
    Push(S, 'b');
    Push(S, 's');
    Push(S, 'f');
    print(S);
    printf("\n\n========================================================================\n\n");
    return 0;
}